<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib uri="/WEB-INF/page-base.tld" prefix="w"%>

<script>
function addflooritem(){
	window.parent.$w.openDialog({url:ctx+'/floor/FloorPage@floorCategoryShow.page?bean.floorid='+$getByName("bean.floorid",$w.currWin()).val(),title:"添加楼层类目 ",w:820,h:480,afterClose:function(re){
		if(re){$w.execForm({"form":$("#flooritemForm")});$w.listFlesh=true;}
	}});
}
function editflooritem(id){
	window.parent.$w.openDialog({url:ctx+'/floor/FloorPage@floorCategoryShow.page?bean.id='+id,title:"编辑楼层类目 ",w:865,h:480,afterClose:function(re){
		if(re){$w.execForm({"form":$("#flooritemForm")});$w.listFlesh=true;}
	}});
}
function delflooritem(id){
	window.parent.$w.confirmMsg("确定删除？", function(r){
		if(r){
			$w.doUrl(ctx+"/floor/FloorPage@floorCategorDel.page?bean.id="+id,{},function(json){
				$w.execForm({"form":$("#flooritemForm")});
			})
		}
	})
}
</script>

<div class="easyui-layout" fit="true">
<div data-options="region:'center'">
	<form id="flooritemForm" action="/floor/FloorPage@floorCategory.page" method="post">
	<w:hidden bind="bean.floorid"/>
	<!-- 操作区域 -->
	<div class="easyui-panel ui-toolBar" border="false" data-options="doSize:false">
		<a href="javascript:;" class="easyui-linkbutton" plain="true" onclick="addflooritem()" style="width:50px;">添加</a>
	</div>
	<div class="ui_line" style="margin-top:10px"></div>
	<!-- 数据列表区域 -->
		<table class="ui-table" width="100%" cellpadding="1" cellspacing="1" data-options="showPage:false">
			<thead>
				<tr class="ui_th">
					<td width="50">ID</td>
					<td>类目名称</td>
					<td width="120">排序号</td>
					<td width="130" align="center">操作</td>
				</tr>
			</thead>
			<tbody>
			<w:iterate id="info" bind="resultList_">
				<tr class="ui_td">
					<td><w:write bind="#info.id"/></td>
					<td><w:write bind="#info.name"/></td>
					<td><w:write bind="#info.orderno"/></td>
					<td align="center">
						<a href="javascript:;" class="ui_btn marginR8" onclick="editflooritem(<w:write bind="#info.id"/>)">修改</a><a href="javascript:;" class="ui_btn" onclick="delflooritem(<w:write bind="#info.id"/>)">删除</a>
					</td>
				</tr>
			</w:iterate>
			</tbody>
		</table>
	</form>
</div>
</div>
